#ifndef __TABLE_H
#define __TABLE_H

#include <gdsl.h>

typedef struct cconf_table_s {
	gdsl_hash_t hash;
	char ** keys;
	int nkeys;
} cconf_table_t;

typedef enum {
	TABLE_NO_ERROR=0,
	TABLE_FULL,
	TABLE_ENTRY_EXISTS
} cconf_table_error_t;

cconf_table_t * cconf_table_create(int size);
void cconf_table_free(void * table);

int cconf_table_insert(cconf_table_t * t, void * entry);
void * cconf_table_get(cconf_table_t * t, char * key);
int cconf_table_get_all(cconf_table_t * t, char *** names, void *** items);

#endif
